/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package anwendungskern.mitarbeiterkomponente;

/**
 *
 * @author Deckard
 */
public class MitarbeiterTyp {
    
    final String name;
    final int personalnr;
    EmailadresseTyp email;
    private static int currentPersNr = 0;
    
    public MitarbeiterTyp(String name, EmailadresseTyp email){
        this. name = name;
        this.personalnr = currentPersNr++;
        this.email = new EmailadresseTyp(email.name, email.server, email.domain);
    }
    
    String getWorkerName(){
        return this.name;
    }
    
    void setNewEmail(EmailadresseTyp email){
        this.email = new EmailadresseTyp(email.name, email.server, email.domain);
    }
    
    
}
